home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Technology Seed / Jan. '98 ATS.toast / QuickTime™ 3.0b11 / QTPublicInterfaces / PInterfaces / Components.p next >
Encoding:
Text File  |  1998-01-12  |  19.7 KB  |  526 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Components.p
  3.  
  4.      Contains:    QuickTime interfaces
  5.  
  6.      Version:    Technology:    
  7.                  Release:    QuickTime 3.0 Beta
  8.  
  9.      Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Components;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __COMPONENTS__}
  28. {$SETC __COMPONENTS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ComponentsIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __ERRORS__}
  35. {$I Errors.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MACTYPES__}
  38. {$I MacTypes.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __MIXEDMODE__}
  41. {$I MixedMode.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __CODEFRAGMENTS__}
  44. {$I CodeFragments.p}
  45. {$ENDC}
  46.  
  47.  
  48. {$PUSH}
  49. {$ALIGN MAC68K}
  50. {$LibExport+}
  51.  
  52.  
  53. CONST
  54.     kAppleManufacturer            = 'appl';                        {  Apple supplied components  }
  55.     kComponentResourceType        = 'thng';                        {  a components resource type  }
  56.     kComponentAliasResourceType    = 'thga';                        {  component alias resource type  }
  57.  
  58.     kAnyComponentType            = 0;
  59.     kAnyComponentSubType        = 0;
  60.     kAnyComponentManufacturer    = 0;
  61.     kAnyComponentFlagsMask        = 0;
  62.  
  63.     cmpWantsRegisterMessage        = $80000000;
  64.     cmpIsComponentAlias            = $10000000;
  65.  
  66.     kComponentOpenSelect        = -1;                            {  ComponentInstance for this open  }
  67.     kComponentCloseSelect        = -2;                            {  ComponentInstance for this close  }
  68.     kComponentCanDoSelect        = -3;                            {  selector # being queried  }
  69.     kComponentVersionSelect        = -4;                            {  no params  }
  70.     kComponentRegisterSelect    = -5;                            {  no params  }
  71.     kComponentTargetSelect        = -6;                            {  ComponentInstance for top of call chain  }
  72.     kComponentUnregisterSelect    = -7;                            {  no params  }
  73.     kComponentGetMPWorkFunctionSelect = -8;                        {  some params  }
  74.  
  75. { Component Resource Extension flags }
  76.     componentDoAutoVersion        = $01;
  77.     componentWantsUnregister    = $02;
  78.     componentAutoVersionIncludeFlags = $04;
  79.     componentHasMultiplePlatforms = $08;
  80.     componentLoadResident        = $10;
  81.  
  82.  
  83.  
  84. { Set Default Component flags }
  85.     defaultComponentIdentical    = 0;
  86.     defaultComponentAnyFlags    = 1;
  87.     defaultComponentAnyManufacturer = 2;
  88.     defaultComponentAnySubType    = 4;
  89.     defaultComponentAnyFlagsAnyManufacturer = 3;
  90.     defaultComponentAnyFlagsAnyManufacturerAnySubType = 7;
  91.  
  92. { RegisterComponentResource flags }
  93.     registerComponentGlobal        = 1;
  94.     registerComponentNoDuplicates = 2;
  95.     registerComponentAfterExisting = 4;
  96.     registerComponentAliasesOnly = 8;
  97.  
  98.  
  99.     unresolvedComponentDLLErr    = -3004;
  100.  
  101.  
  102. TYPE
  103.     ComponentDescriptionPtr = ^ComponentDescription;
  104.     ComponentDescription = RECORD
  105.         componentType:            OSType;                                    {  A unique 4-byte code indentifying the command set  }
  106.         componentSubType:        OSType;                                    {  Particular flavor of this instance  }
  107.         componentManufacturer:    OSType;                                    {  Vendor indentification  }
  108.         componentFlags:            UInt32;                                    {  8 each for Component,Type,SubType,Manuf/revision  }
  109.         componentFlagsMask:        UInt32;                                    {  Mask for specifying which flags to consider in search, zero during registration  }
  110.     END;
  111.  
  112.  
  113.     ResourceSpecPtr = ^ResourceSpec;
  114.     ResourceSpec = RECORD
  115.         resType:                OSType;                                    {  4-byte code      }
  116.         resID:                    INTEGER;                                {                }
  117.     END;
  118.  
  119.     ComponentResourcePtr = ^ComponentResource;
  120.     ComponentResource = RECORD
  121.         cd:                        ComponentDescription;                    {  Registration parameters  }
  122.         component:                ResourceSpec;                            {  resource where Component code is found  }
  123.         componentName:            ResourceSpec;                            {  name string resource  }
  124.         componentInfo:            ResourceSpec;                            {  info string resource  }
  125.         componentIcon:            ResourceSpec;                            {  icon resource  }
  126.     END;
  127.  
  128.     ComponentResourceHandle                = ^ComponentResourcePtr;
  129.     ComponentPlatformInfoPtr = ^ComponentPlatformInfo;
  130.     ComponentPlatformInfo = RECORD
  131.         componentFlags:            LONGINT;                                {  flags of Component  }
  132.         component:                ResourceSpec;                            {  resource where Component code is found  }
  133.         platformType:            INTEGER;                                {  gestaltSysArchitecture result  }
  134.     END;
  135.  
  136.     ComponentResourceExtensionPtr = ^ComponentResourceExtension;
  137.     ComponentResourceExtension = RECORD
  138.         componentVersion:        LONGINT;                                {  version of Component  }
  139.         componentRegisterFlags:    LONGINT;                                {  flags for registration  }
  140.         componentIconFamily:    INTEGER;                                {  resource id of Icon Family  }
  141.     END;
  142.  
  143.     ComponentPlatformInfoArrayPtr = ^ComponentPlatformInfoArray;
  144.     ComponentPlatformInfoArray = RECORD
  145.         count:                    LONGINT;
  146.         platformArray:            ARRAY [0..0] OF ComponentPlatformInfo;
  147.     END;
  148.  
  149.     ExtComponentResourcePtr = ^ExtComponentResource;
  150.     ExtComponentResource = RECORD
  151.         cd:                        ComponentDescription;                    {  registration parameters  }
  152.         component:                ResourceSpec;                            {  resource where Component code is found  }
  153.         componentName:            ResourceSpec;                            {  name string resource  }
  154.         componentInfo:            ResourceSpec;                            {  info string resource  }
  155.         componentIcon:            ResourceSpec;                            {  icon resource  }
  156.         componentVersion:        LONGINT;                                {  version of Component  }
  157.         componentRegisterFlags:    LONGINT;                                {  flags for registration  }
  158.         componentIconFamily:    INTEGER;                                {  resource id of Icon Family  }
  159.         count:                    LONGINT;                                {  elements in platformArray  }
  160.         platformArray:            ARRAY [0..0] OF ComponentPlatformInfo;
  161.     END;
  162.  
  163.     ComponentAliasResourcePtr = ^ComponentAliasResource;
  164.     ComponentAliasResource = RECORD
  165.         cr:                        ComponentResource;                        {  Registration parameters  }
  166.         aliasCD:                ComponentDescription;                    {  component alias description  }
  167.     END;
  168.  
  169. {  Structure received by Component:        }
  170.     ComponentParametersPtr = ^ComponentParameters;
  171.     ComponentParameters = PACKED RECORD
  172.         flags:                    UInt8;                                    {  call modifiers: sync/async, deferred, immed, etc  }
  173.         paramSize:                UInt8;                                    {  size in bytes of actual parameters passed to this call  }
  174.         what:                    INTEGER;                                {  routine selector, negative for Component management calls  }
  175.         params:                    ARRAY [0..0] OF LONGINT;                {  actual parameters for the indicated routine  }
  176.     END;
  177.  
  178.     ComponentRecordPtr = ^ComponentRecord;
  179.     ComponentRecord = RECORD
  180.         data:                    ARRAY [0..0] OF LONGINT;
  181.     END;
  182.  
  183.     Component                            = ^ComponentRecord;
  184.     ComponentInstanceRecordPtr = ^ComponentInstanceRecord;
  185.     ComponentInstanceRecord = RECORD
  186.         data:                    ARRAY [0..0] OF LONGINT;
  187.     END;
  188.  
  189.     ComponentInstance                    = ^ComponentInstanceRecord;
  190.     RegisteredComponentRecordPtr = ^RegisteredComponentRecord;
  191.     RegisteredComponentRecord = RECORD
  192.         data:                    ARRAY [0..0] OF LONGINT;
  193.     END;
  194.  
  195.     RegisteredComponentPtr                = ^RegisteredComponentRecord;
  196.     RegisteredComponentInstanceRecordPtr = ^RegisteredComponentInstanceRecord;
  197.     RegisteredComponentInstanceRecord = RECORD
  198.         data:                    ARRAY [0..0] OF LONGINT;
  199.     END;
  200.  
  201.     RegisteredComponentInstancePtr        = ^RegisteredComponentInstanceRecord;
  202.     ComponentResult                        = LONGINT;
  203.  
  204. CONST
  205.     platform68k                    = 1;                            {  platform type (response from gestaltSysArchitecture)  }
  206.     platformPowerPC                = 2;
  207.     platformInterpreted            = 3;
  208.     platformWin32                = 4;
  209.  
  210.     mpWorkFlagDoWork            = $01;
  211.     mpWorkFlagDoCompletion        = $02;
  212.     mpWorkFlagCopyWorkBlock        = $04;
  213.     mpWorkFlagDontBlock            = $08;
  214.     mpWorkFlagGetProcessorCount    = $10;
  215.     mpWorkFlagGetIsRunning        = $40;
  216.  
  217.  
  218. TYPE
  219.     ComponentMPWorkFunctionHeaderRecordPtr = ^ComponentMPWorkFunctionHeaderRecord;
  220.     ComponentMPWorkFunctionHeaderRecord = RECORD
  221.         headerSize:                UInt32;
  222.         recordSize:                UInt32;
  223.         workFlags:                UInt32;
  224.         processorCount:            UInt16;
  225.         unused:                    SInt8;
  226.         isRunning:                SInt8;
  227.     END;
  228.  
  229. {$IFC TYPED_FUNCTION_POINTERS}
  230.     ComponentMPWorkFunctionProcPtr = FUNCTION(globalRefCon: UNIV Ptr; header: ComponentMPWorkFunctionHeaderRecordPtr): ComponentResult;
  231. {$ELSEC}
  232.     ComponentMPWorkFunctionProcPtr = ProcPtr;
  233. {$ENDC}
  234.  
  235. {$IFC TYPED_FUNCTION_POINTERS}
  236.     ComponentRoutineProcPtr = FUNCTION(VAR cp: ComponentParameters; componentStorage: Handle): ComponentResult;
  237. {$ELSEC}
  238.     ComponentRoutineProcPtr = ProcPtr;
  239. {$ENDC}
  240.  
  241.     ComponentMPWorkFunctionUPP = UniversalProcPtr;
  242.     ComponentRoutineUPP = UniversalProcPtr;
  243. {
  244.     The parameter list for each ComponentFunction is unique. It is 
  245.     therefore up to users to create the appropriate procInfo for their 
  246.     own ComponentFunctions where necessary.
  247. }
  248.     ComponentFunctionUPP                = UniversalProcPtr;
  249.  
  250. {*******************************************************
  251. *                                                        *
  252. *                  APPLICATION LEVEL CALLS                    *
  253. *                                                        *
  254. *******************************************************}
  255. {*******************************************************
  256. * Component Database Add, Delete, and Query Routines 
  257. *******************************************************}
  258. FUNCTION RegisterComponent(VAR cd: ComponentDescription; componentEntryPoint: ComponentRoutineUPP; global: INTEGER; componentName: Handle; componentInfo: Handle; componentIcon: Handle): Component;
  259.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  260.     INLINE $7001, $A82A;
  261.     {$ENDC}
  262. FUNCTION RegisterComponentResource(cr: ComponentResourceHandle; global: INTEGER): Component;
  263.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  264.     INLINE $7012, $A82A;
  265.     {$ENDC}
  266. FUNCTION UnregisterComponent(aComponent: Component): OSErr;
  267.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  268.     INLINE $7002, $A82A;
  269.     {$ENDC}
  270. FUNCTION FindNextComponent(aComponent: Component; VAR looking: ComponentDescription): Component;
  271.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  272.     INLINE $7004, $A82A;
  273.     {$ENDC}
  274. FUNCTION CountComponents(VAR looking: ComponentDescription): LONGINT;
  275.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  276.     INLINE $7003, $A82A;
  277.     {$ENDC}
  278. FUNCTION GetComponentInfo(aComponent: Component; VAR cd: ComponentDescription; componentName: Handle; componentInfo: Handle; componentIcon: Handle): OSErr;
  279.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  280.     INLINE $7005, $A82A;
  281.     {$ENDC}
  282. FUNCTION GetComponentListModSeed: LONGINT;
  283.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  284.     INLINE $7006, $A82A;
  285.     {$ENDC}
  286. FUNCTION GetComponentTypeModSeed(componentType: OSType): LONGINT;
  287.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  288.     INLINE $702C, $A82A;
  289.     {$ENDC}
  290. {*******************************************************
  291. * Component Instance Allocation and dispatch routines 
  292. *******************************************************}
  293. FUNCTION OpenAComponent(aComponent: Component; VAR ci: ComponentInstance): OSErr;
  294.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  295.     INLINE $702D, $A82A;
  296.     {$ENDC}
  297. FUNCTION OpenComponent(aComponent: Component): ComponentInstance;
  298.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  299.     INLINE $7007, $A82A;
  300.     {$ENDC}
  301. FUNCTION CloseComponent(aComponentInstance: ComponentInstance): OSErr;
  302.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  303.     INLINE $7008, $A82A;
  304.     {$ENDC}
  305. FUNCTION GetComponentInstanceError(aComponentInstance: ComponentInstance): OSErr;
  306.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  307.     INLINE $700A, $A82A;
  308.     {$ENDC}
  309. {*******************************************************
  310. *                                                        *
  311. *                      CALLS MADE BY COMPONENTS              *
  312. *                                                        *
  313. *******************************************************}
  314. {*******************************************************
  315. * Component Management routines
  316. *******************************************************}
  317. PROCEDURE SetComponentInstanceError(aComponentInstance: ComponentInstance; theError: OSErr);
  318.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  319.     INLINE $700B, $A82A;
  320.     {$ENDC}
  321. FUNCTION GetComponentRefcon(aComponent: Component): LONGINT;
  322.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  323.     INLINE $7010, $A82A;
  324.     {$ENDC}
  325. PROCEDURE SetComponentRefcon(aComponent: Component; theRefcon: LONGINT);
  326.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  327.     INLINE $7011, $A82A;
  328.     {$ENDC}
  329. FUNCTION OpenComponentResFile(aComponent: Component): INTEGER;
  330.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  331.     INLINE $7015, $A82A;
  332.     {$ENDC}
  333. FUNCTION OpenAComponentResFile(aComponent: Component; VAR resRef: INTEGER): OSErr;
  334.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  335.     INLINE $702F, $A82A;
  336.     {$ENDC}
  337. FUNCTION CloseComponentResFile(refnum: INTEGER): OSErr;
  338.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  339.     INLINE $7018, $A82A;
  340.     {$ENDC}
  341. FUNCTION GetComponentResource(aComponent: Component; resType: OSType; resID: INTEGER; VAR theResource: Handle): OSErr;
  342.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  343.     INLINE $7035, $A82A;
  344.     {$ENDC}
  345. FUNCTION GetComponentIndString(aComponent: Component; VAR theString: Str255; strListID: INTEGER; index: INTEGER): OSErr;
  346.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  347.     INLINE $7036, $A82A;
  348.     {$ENDC}
  349. FUNCTION ResolveComponentAlias(aComponent: Component): Component;
  350.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  351.     INLINE $7020, $A82A;
  352.     {$ENDC}
  353. {*******************************************************
  354. * Component Instance Management routines
  355. *******************************************************}
  356. FUNCTION GetComponentInstanceStorage(aComponentInstance: ComponentInstance): Handle;
  357.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  358.     INLINE $700C, $A82A;
  359.     {$ENDC}
  360. PROCEDURE SetComponentInstanceStorage(aComponentInstance: ComponentInstance; theStorage: Handle);
  361.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  362.     INLINE $700D, $A82A;
  363.     {$ENDC}
  364. FUNCTION GetComponentInstanceA5(aComponentInstance: ComponentInstance): LONGINT;
  365.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  366.     INLINE $700E, $A82A;
  367.     {$ENDC}
  368. PROCEDURE SetComponentInstanceA5(aComponentInstance: ComponentInstance; theA5: LONGINT);
  369.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  370.     INLINE $700F, $A82A;
  371.     {$ENDC}
  372. FUNCTION CountComponentInstances(aComponent: Component): LONGINT;
  373.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  374.     INLINE $7013, $A82A;
  375.     {$ENDC}
  376. { useful helper routines for convenient method dispatching }
  377. FUNCTION CallComponentFunction(VAR params: ComponentParameters; func: ComponentFunctionUPP): LONGINT;
  378.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  379.     INLINE $70FF, $A82A;
  380.     {$ENDC}
  381. FUNCTION CallComponentFunctionWithStorage(storage: Handle; VAR params: ComponentParameters; func: ComponentFunctionUPP): LONGINT;
  382.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  383.     INLINE $70FF, $A82A;
  384.     {$ENDC}
  385. {$IFC TARGET_CPU_PPC AND TARGET_OS_MAC }
  386. FUNCTION CallComponentFunctionWithStorageProcInfo(storage: Handle; VAR params: ComponentParameters; func: ProcPtr; funcProcInfo: LONGINT): LONGINT;
  387. {$ELSEC}
  388. {$ENDC}
  389.  
  390. FUNCTION DelegateComponentCall(VAR originalParams: ComponentParameters; ci: ComponentInstance): LONGINT;
  391.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  392.     INLINE $7024, $A82A;
  393.     {$ENDC}
  394. FUNCTION SetDefaultComponent(aComponent: Component; flags: INTEGER): OSErr;
  395.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  396.     INLINE $701E, $A82A;
  397.     {$ENDC}
  398. FUNCTION OpenDefaultComponent(componentType: OSType; componentSubType: OSType): ComponentInstance;
  399.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  400.     INLINE $7021, $A82A;
  401.     {$ENDC}
  402. FUNCTION OpenADefaultComponent(componentType: OSType; componentSubType: OSType; VAR ci: ComponentInstance): OSErr;
  403.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  404.     INLINE $702E, $A82A;
  405.     {$ENDC}
  406. FUNCTION CaptureComponent(capturedComponent: Component; capturingComponent: Component): Component;
  407.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  408.     INLINE $701C, $A82A;
  409.     {$ENDC}
  410. FUNCTION UncaptureComponent(aComponent: Component): OSErr;
  411.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  412.     INLINE $701D, $A82A;
  413.     {$ENDC}
  414. FUNCTION RegisterComponentResourceFile(resRefNum: INTEGER; global: INTEGER): LONGINT;
  415.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  416.     INLINE $7014, $A82A;
  417.     {$ENDC}
  418. FUNCTION GetComponentIconSuite(aComponent: Component; VAR iconSuite: Handle): OSErr;
  419.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  420.     INLINE $7029, $A82A;
  421.     {$ENDC}
  422.  
  423. {*******************************************************
  424. *                                                        *
  425. *              Direct calls to the Components                *
  426. *                                                        *
  427. *******************************************************}
  428. {  Old style names }
  429.  
  430. FUNCTION ComponentFunctionImplemented(ci: ComponentInstance; ftnNumber: INTEGER): LONGINT;
  431.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  432.     INLINE $2F3C, $0002, $FFFD, $7000, $A82A;
  433.     {$ENDC}
  434. FUNCTION GetComponentVersion(ci: ComponentInstance): LONGINT;
  435.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  436.     INLINE $2F3C, $0000, $FFFC, $7000, $A82A;
  437.     {$ENDC}
  438. FUNCTION ComponentSetTarget(ci: ComponentInstance; target: ComponentInstance): LONGINT;
  439.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  440.     INLINE $2F3C, $0004, $FFFA, $7000, $A82A;
  441.     {$ENDC}
  442. {  New style names }
  443.  
  444. FUNCTION CallComponentOpen(ci: ComponentInstance; self: ComponentInstance): ComponentResult;
  445.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  446.     INLINE $2F3C, $0004, $FFFF, $7000, $A82A;
  447.     {$ENDC}
  448. FUNCTION CallComponentClose(ci: ComponentInstance; self: ComponentInstance): ComponentResult;
  449.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  450.     INLINE $2F3C, $0004, $FFFE, $7000, $A82A;
  451.     {$ENDC}
  452. FUNCTION CallComponentCanDo(ci: ComponentInstance; ftnNumber: INTEGER): ComponentResult;
  453.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  454.     INLINE $2F3C, $0002, $FFFD, $7000, $A82A;
  455.     {$ENDC}
  456. FUNCTION CallComponentVersion(ci: ComponentInstance): ComponentResult;
  457.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  458.     INLINE $2F3C, $0000, $FFFC, $7000, $A82A;
  459.     {$ENDC}
  460. FUNCTION CallComponentRegister(ci: ComponentInstance): ComponentResult;
  461.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  462.     INLINE $2F3C, $0000, $FFFB, $7000, $A82A;
  463.     {$ENDC}
  464. FUNCTION CallComponentTarget(ci: ComponentInstance; target: ComponentInstance): ComponentResult;
  465.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  466.     INLINE $2F3C, $0004, $FFFA, $7000, $A82A;
  467.     {$ENDC}
  468. FUNCTION CallComponentUnregister(ci: ComponentInstance): ComponentResult;
  469.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  470.     INLINE $2F3C, $0000, $FFF9, $7000, $A82A;
  471.     {$ENDC}
  472. FUNCTION CallComponentGetMPWorkFunction(ci: ComponentInstance; VAR workFunction: ComponentMPWorkFunctionUPP; VAR refCon: UNIV Ptr): ComponentResult;
  473.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  474.     INLINE $2F3C, $0008, $FFF8, $7000, $A82A;
  475.     {$ENDC}
  476.  
  477. {$IFC NOT TARGET_OS_MAC }
  478.         CallComponent is used by ComponentGlue routines to manually call a component function.
  479.      }
  480. FUNCTION CallComponent(ci: ComponentInstance; VAR cp: ComponentParameters): ComponentResult;
  481. {$ENDC}
  482.  
  483. { UPP call backs }
  484.  
  485. CONST
  486.     uppComponentMPWorkFunctionProcInfo = $000003F0;
  487.     uppComponentRoutineProcInfo = $000003F0;
  488.  
  489. FUNCTION NewComponentMPWorkFunctionProc(userRoutine: ComponentMPWorkFunctionProcPtr): ComponentMPWorkFunctionUPP;
  490.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  491.     INLINE $2E9F;
  492.     {$ENDC}
  493.  
  494. FUNCTION NewComponentRoutineProc(userRoutine: ComponentRoutineProcPtr): ComponentRoutineUPP;
  495.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  496.     INLINE $2E9F;
  497.     {$ENDC}
  498.  
  499. FUNCTION CallComponentMPWorkFunctionProc(globalRefCon: UNIV Ptr; header: ComponentMPWorkFunctionHeaderRecordPtr; userRoutine: ComponentMPWorkFunctionUPP): ComponentResult;
  500.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  501.     INLINE $205F, $4E90;
  502.     {$ENDC}
  503.  
  504. FUNCTION CallComponentRoutineProc(VAR cp: ComponentParameters; componentStorage: Handle; userRoutine: ComponentRoutineUPP): ComponentResult;
  505.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  506.     INLINE $205F, $4E90;
  507.     {$ENDC}
  508. { ProcInfos }
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515. {$ALIGN RESET}
  516. {$POP}
  517.  
  518. {$SETC UsingIncludes := ComponentsIncludes}
  519.  
  520. {$ENDC} {__COMPONENTS__}
  521.  
  522. {$IFC NOT UsingIncludes}
  523.  END.
  524. {$ENDC}
  525.